// This mod by cleomodlar
{$CLEO .cs}

//-------------MAIN---------------
thread 'hold'
0AF0: 1@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon1" 
0AF0: 2@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon2" 
0AF0: 3@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon3" 
0AF0: 4@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon4" 
0AF0: 5@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon5" 
0AF0: 6@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon6" 
0AF0: 7@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon7" 
0AF0: 8@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDSWORD" key "Weapon8" 

:hold1
04ED: load_animation "holdarmed" 
wait 0
if and 
player.Defined($PLAYER_ACTOR)
04EE:   animation "holdarmed" loaded 
jf @hold1
wait 0
if or     
02D8:   actor $PLAYER_ACTOR current_weapon == 1@   
02D8:   actor $PLAYER_ACTOR current_weapon == 2@
02D8:   actor $PLAYER_ACTOR current_weapon == 3@
02D8:   actor $PLAYER_ACTOR current_weapon == 4@
02D8:   actor $PLAYER_ACTOR current_weapon == 5@
02D8:   actor $PLAYER_ACTOR current_weapon == 6@
02D8:   actor $PLAYER_ACTOR current_weapon == 7@   
02D8:   actor $PLAYER_ACTOR current_weapon == 8@
jf @hold1
0A8C: write_memory 6330958 size 4 value -1869574000 virtual_protect 1 
0A8C: write_memory 6330962 size 2 value 37008 virtual_protect 1    
Actor.SetWalkStyle($PLAYER_ACTOR, "holdsword")                          
jump @hold2
 
:hold2         
wait 0  
if and                                       
82D8: not  actor $PLAYER_ACTOR current_weapon == 1@ 
82D8: not  actor $PLAYER_ACTOR current_weapon == 2@
82D8: not  actor $PLAYER_ACTOR current_weapon == 3@
82D8: not  actor $PLAYER_ACTOR current_weapon == 4@ 
82D8: not  actor $PLAYER_ACTOR current_weapon == 5@
82D8: not  actor $PLAYER_ACTOR current_weapon == 6@
82D8: not  actor $PLAYER_ACTOR current_weapon == 7@ 
82D8: not  actor $PLAYER_ACTOR current_weapon == 8@
jf @hold2                    
 0A8C: write_memory 6330958 size 4 value 81036937 virtual_protect 1 
0A8C: write_memory 6330962 size 2 value 0 virtual_protect 1 
jump @hold1   
